home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / libsrc / getcurs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  471 b   |  27 lines

  1. /*
  2. ** getcurs.c
  3. **
  4. ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include <dos.h>
  9. #include "pictor.h"
  10.  
  11. /*
  12. ** Returns the text cursor position as an integer.
  13. ** The low byte is the column, high byte is the row.
  14. */
  15. int getcurs(void)
  16. {
  17.     union REGS regs;
  18.  
  19.     regs.h.ah = 0x03;
  20.     regs.h.bh = (unsigned char)_PL_page;
  21.     int86(0x10,®s,®s);
  22.     regs.x.dx += 0x0101;
  23.  
  24.     return(regs.x.dx);
  25.  
  26. } /* getcurs */
  27.